#include <iostream>
using namespace std;


class Solution
{
public:
    int minChanges(int n, int k)
    {
        if ((n & k) != k) return -1;
        int sum = n ^ k;
        return get_one(sum);
    }

    int get_one(int sum)
    {
        int ret = 0;
        while (sum)
        {
            ret++;
            sum = sum & (sum - 1);
        }

        return ret;
    }
};

int main()
{
    Solution s;
    s.minChanges(13, 4);
    return 0;
}